{# ShopAdminBundle base template   --wangxi#}
{% block page_header %}
{% include 'ShopAdminBundle::header.html.twig' %}
{% endblock %}

{% block plugin_css %}
{% endblock %}

</head>

{% if not app.session.get('user') and pg_login is not defined %}
    <script>
        location.replace('/admin/login');
    </script>
{% endif %}

{% block page_body %}
<body class="skin-black sidebar-mini">

<div class="wrapper">

    {% block topnav %}
    <header class="main-header">
        <!-- Logo -->
        {% if pg_login is not defined %}
        <a href="/admin" class="logo">
        {% else %}
        <a href="javascript:void(0);" class="logo">
        {% endif %}
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><i class="fa fa-leaf green"></i>口袋乐园</span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><i class="fa fa-leaf green"></i>口袋乐园</span>
        </a>

        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top" role="navigation">
            {% if pg_login is not defined %}
                <!-- Sidebar toggle button-->
                <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">Toggle navigation</span>
                </a>

                {% include 'ShopAdminBundle::message_box.html.twig' %}

            {% endif %}
        </nav>
    </header>
    {% endblock %}

    {#  if pg_login variable is defined, assume it's the login page#}
    {% if pg_login is not defined %}
    {% block sidebar %}
        {% include 'ShopAdminBundle::sidebar.html.twig' %}
    {% endblock %}
    {% endif %}

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">

        {% if pg_login is not defined %}
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <ol class="breadcrumb">
                <li><a href="javascript:void(0);">
                    <i class="fa fa-bookmark green"></i> {{ _bundle | default('Admin') }}
                    </a>
                </li>
                <li><a href="#">{{ _module | default('Dashboard') }}</a></li>
                <li class="active"><a href="#">{{ _current | default('index') }}</a></li>
            </ol>
        </section>
        {% endif %}

        <!-- Main content -->
        <section class="content">
            <!-- Main row -->
            <div class="row">
                <div class="col-xs-12 col-md-12">
                    {% block main_content %}
                    {% endblock %}
                </div>
            </div><!-- /.row (main row) -->

        </section><!-- /.content -->

    </div><!-- /.content-wrapper -->


</div><!-- ./wrapper -->

{% endblock %}

{% block page_footer %}
{% include 'ShopAdminBundle::footer.html.twig' %}
{% endblock %}

{% block plugin_js %}
{% endblock %}

</body>
</html>